let jjrklldbOpt = {
  tooltip: {
    trigger: 'axis'
  },
  legend: {
    data: ['上年', '本年'],
    icon: 'rect',
    right:'1%',
    itemHeight: 5
  },
  grid: {
    left: '3%',
    right: '4%',
    bottom: '6%',
    top: '30%',
    containLabel: true
  },
  xAxis: {
    type: 'category',
    axisTick:{
    	show: false
    },
    boundaryGap: false,
    data: []
  },
  yAxis: {
    type: 'value',
    splitLine:{
	  	lineStyle:{
	  		type: 'dashed',
	  		color: 'rgba(39,163,212,0.52)'
	  	}
	  },
  },
  series: [
    {
      name: '上年',
      type: 'line',
      itemStyle: { color: '#5AFFFA' },
      lineStyle: {
        width: 4
      },
      smooth: true,
      data: []
    },
    {
      name: '本年',
      type: 'line',
      itemStyle: { color: '#F44538' },
      lineStyle: {
        width: 4
      },
      smooth: true,
      data: []
    }
  ]
};

const refreshjjrklldb = function(){
	jjrklldbOpt.xAxis.data = [];
	jjrklldbOpt.series[0].data = [];
	jjrklldbOpt.series[1].data = [];
	for (var i = 1;i <= 7;i++) {
		jjrklldbOpt.xAxis.data.push('第'+i+'天')
		jjrklldbOpt.series[0].data.push(parseInt(Math.random()*100))
		jjrklldbOpt.series[1].data.push(parseInt(Math.random()*100))
	}
	
	echarts.init(document.getElementById('jjrklldb')).setOption(jjrklldbOpt, true);
}
refreshjjrklldb();
const jjrklldbChange = function(index){
	refreshjjrklldb();
}